<template>
	<view class="container">
		<uni-section title="评论" type="line">
			<view class="">
				{{detail.comment}}
			</view>
		</uni-section>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail:{
					
				}
			}
		},
		methods: {

		},
		// onLoad: () => {
		// 	uni.onTabBarMidButtonTap(function(e){
		// 		console.log(e)
				
		// 	})
		onLoad(a) {
			uni.request({
					url: 'http://localhost:8090/foodapp/comment/findone',
					method: 'POST',
					data: {"id":a.id},
					success: res => {
						if (res.data.success) {
							this.detail = res.data.data
							uni.showToast({
								title: '成功',
								icon: 'none'
							});
						} else {
							uni.showToast({
								title: '失败',
								icon: 'none'
							});
						}
					},
					fail: () => {
						uni.showToast({
							title: '失败',
							icon: 'none'
						});
					},
					complete: () => {}
				});
			}
		
		
	}
</script>

<style>
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
	}
</style>
